package com.ssm.service.impl;

import com.ssm.dao.IUserDao;
import com.ssm.dao.UserInfoMapper;
import com.ssm.model.User;
import com.ssm.model.UserInfo;
import com.ssm.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;


@Service
public class UserserviceImpl implements IUserService {


     @Autowired
     private UserInfoMapper userDao;


    public UserInfo findUserById(int id) {

        return userDao.selectByPrimaryKey(id);
    }

    public UserInfo addUser(UserInfo user) {
        userDao.insert(user);

        return user;
    }

    public List<UserInfo> getAllUsers() {
        return null;
    }

}